﻿@using ViewComponentSample.ViewComponents;
@addTagHelper *, AspDotNet.Core6.Mvc.ViewComponents
@model IEnumerable<Prodcut>
@{
    ViewData["Title"] = "Home Page";
}

<div class="container">
    <div class="col-md-offset-2 col-md-10">
        <a class="btn btn-secondary" asp-action="AsyncIndex" asp-controller="home">AsyncIndex</a>
    </div>
    <div class="col-md-offset-2 col-md-10">
        <a class="btn btn-secondary" asp-action="IndexViewComponent" asp-controller="home">IndexViewComponent</a>
    </div>
</div>

<div>
    <partial name="Partial"></partial>
</div>

<div>
    @await Component.InvokeAsync("Shopping",new { maxPrice=5m })
</div>

<div>
    @await Component.InvokeAsync("Shopping",new { maxPrice=2m })
</div>

<div>
    @await Component.InvokeAsync(typeof(ShoppingViewComponent),new { maxPrice=2m })
</div>

<div>
    <vc:shopping max-price="7"></vc:shopping>
</div>